package com.validator.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.validator.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface OrderDao extends BaseMapper<Order> {


    List<Order> listByPage(
            @Param("orderNumber") String orderNumber,
            @Param("equipmentType") String equipmentType,
            @Param("sn") String sn,
            @Param("name") String name,
            @Param("email") String email,
            @Param("phoneNumber") String phoneNumber,
            @Param("validateTime") String validateTime,
            @Param("orderBy") String orderBy,
            @Param("status") Integer status,
            @Param("start") int start,
            @Param("end") int end
    );

    long countByPage(
            @Param("orderNumber") String orderNumber,
            @Param("equipmentType") String equipmentType,
            @Param("sn") String sn,
            @Param("name") String name,
            @Param("email") String email,
            @Param("phoneNumber") String phoneNumber,
            @Param("validateTime") String validateTime,
            @Param("orderBy") String orderBy,
            @Param("status") Integer status
    );

}
